﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplicationRating.Views
{
    public partial class Trends : System.Web.UI.Page
    {

        static string prevPage = String.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                try
                {
                    prevPage = Request.UrlReferrer.ToString();
                }
                catch
                {
                }
            }

            String mgid = Request.QueryString["MGID"];
            int curImageId = Convert.ToInt32(mgid);
            //lblMessageM.Text = " imageid mgid =" + mgid;

            //tbMGIDnow.Text = mgid;
            //lblMessageM.Text = " imageid mgid =" + mgid;

        }

        protected void SqlDataSource_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
        {
            String mgidn = Request.QueryString["MGID"];
            tbMGID.Text = mgidn;
            int curImgIdn = Convert.ToInt32(mgidn);
         

            e.Command.Parameters["@imageid"].Value = curImgIdn;

        } 

        protected void btnBack_Click(object sender, EventArgs e)
        {

            Response.Redirect(prevPage);

        }



    }
}